# require a cmake version > to 2.8.1
cmake_minimum_required(VERSION 2.8.1)

project(LUTEDITOR CXX C)


# Find TIFF
find_package(TIFF REQUIRED)
if(TIFF_FOUND)
   include_directories(${TIFF_INCLUDE_DIR} )
else()
    message(FATAL_ERROR " Tiff lib not found ")
endif()

# Find PNG
find_package(PNG REQUIRED)
if(PNG_FOUND)
   include_directories(${PNG_INCLUDE_DIR} )
else()
    message(FATAL_ERROR "png lib not found ")
endif()

# Find JPEG
find_package(JPEG REQUIRED)
if(JPEG_FOUND)
   include_directories(${JPEG_INCLUDE_DIR} )
else()
    message(FATAL_ERROR "jpeg lib not found ")
endif()

# Find BOOST
set(Boost_NO_SYSTEM_PATHS ON CACHE BOOL "use system path for finding boost")
set(BOOST_ROOT  "/usr/local" CACHE PATH "boost root directory" )
set(Boost_USE_STATIC_LIBS OFF CACHE BOOL "use boost static lib" )
set(Boost_USE_MULTITHREADED ON CACHE BOOL "use boost multi threaded lib")
set(Boost_ADDITIONAL_VERSIONS
                              "1.44" "1.44.0"
                              "1.45" "1.45.0"
                              "1.46" "1.46.1"
                              "1.47" "1.47.0")
find_package( Boost 1.42  COMPONENTS filesystem REQUIRED )
if( Boost_FOUND )
    include_directories( ${Boost_INCLUDE_DIR} )
else()
    message( FATAL_ERROR "Boost not found ! Please set Boost path ..." )
endif()

include_directories(include)
add_subdirectory(extern)
add_subdirectory(src)
add_subdirectory(app)

